import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/common/login'



Vue.use(Router)
export default new Router({
    routes: [{
        path: '/',
        name: 'login',
        component: login
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import('../components/common/login.vue')
    },
    {
        path: '/home',
        name: 'home',
        redirect: '/first',
        component: () =>
            import('../views/home.vue'),
        meta: { title: '系统首页' },
        children: [{
            path: '/first',
            name: 'first',
            component: () =>
                import('../views/first.vue'),
            meta: { title: '系统首页' },
        },
        {
            path: '/daily',
            name: 'daily',
            component: () =>
                import('../views/daily.vue'),
            meta: { title: '日程安排' },
        },
        {
            path: '/money',
            name: 'money',
            component: () =>
                import('../views/money.vue'),
            meta: { title: '工资信息' },
        },
        {
            path: '/rest',
            name: 'rest',
            component: () =>
                import('../views/rest.vue'),
            meta: { title: '请假信息' },
        },
        {
            path: '/workthing',
            name: 'workthing',
            component: () =>
                import('../views/workthing.vue'),
            meta: { title: '办公用品' },
        },
        {
            path: '/hetong',
            name: 'hetong',
            component: () =>
                import('../views/hetong.vue'),
            meta: { title: '合同信息' },
        },
        {
            path: '/study',
            name: 'study',
            component: () =>
                import('../views/peixun.vue'),
            meta: { title: '培训信息' },
        },
        {
            path: '/worker',
            name: 'worker',
            component: () =>
                import('../views/worker.vue'),
            meta: { title: '员工信息' },
        },
        {
            path: '/msg',
            name: 'msg',
            component: () =>
                import('../views/msg.vue'),
            meta: { title: '消息管理' },
        },
        {
            path: '/part',
            name: 'part',
            component: () =>
                import('../views2/part.vue'),
            meta: { title: '部门管理' },
        },
        {
            path: '/position',
            name: 'position',
            component: () =>
                import('../views2/position.vue'),
            meta: { title: '职位管理' },
        },
        {
            path: '/maniger',
            name: 'maniger',
            component: () =>
                import('../views2/maniger.vue'),
            meta: { title: '权限管理' },
        },
        //办公管理配置路由
        {
            path: '/officemanagement',
            name: 'officemanagement',
            component: () =>
                import('../views2/officemanagement.vue'),
            meta: { title: '办公管理' },
        },
        // 车辆管理配置路由
        {
            path: '/vehicle',
            name: 'vehicle',
            component: () =>
                import('../views2/vehicle.vue'),
            meta: { title: '车辆管理' },
        },
        // 新闻管理配置路由
        {
            path: '/management',
            name: 'management',
            component: () =>
                import('../views2/management.vue'),
            meta: { title: '新闻管理' },
        },
        // 员工管理
        {
            path: '/staff',
            name: 'staff',
            component: () => import('../views2/staff.vue'),
            meta: { title: '员工管理' },
        },
        // 合同管理
        {
            path: '/contract',
            name: 'contract',
            component: () => import('../views2/contract.vue'),
            meta: { title: '合同管理' },
        },
        // 请假管理
        {
            path: '/leave',
            name: 'leave',
            component: () => import('../views2/leave.vue'),
            meta: { title: '请假管理' },
        },
        // 工资管理
        {
            path: '/salary',
            name: 'salary',
            component: () => import('../views2/salary.vue'),
            meta: { title: '工资管理' },
        },
        // 培训管理
        {
            path: '/train',
            name: 'train',
            component: () => import('../views2/train.vue'),
            meta: { title: '培训管理' },
        },
        ]
    },

    ]
})